This page shows how Safari blocks pop-ups and provides solutions for working with API calls. For best results, view on a Mac or iPhone/iPad with "Block Pop-ups" enabled in Safari settings.
This button calls window.open() immediately on a click. This is considered a user-initiated action and
is allowed by Safari's pop-up blocker.
This button has a delay (simulating an API call) before attempting to call window.open(). The action
is no longer considered user-initiated and will be blocked by Safari.
This demonstrates the recommended solution: open a blank pop-up immediately on user interaction and then update its URL after the asynchronous API call completes.